import axios from '@/libs/api.request'
import Url from '@/tool/Url'

class User{

    static COMMON = 0
    static SUBSCRIPTION = 1
    static COMPANY = 2
    static VIRTUAL = 3
    static ADMIN   = 10

    static IS_VEST = 1

    static STATUS_REVIEW = 0;
    static STATUS_PASS = 1;
    static STATUS_FORBID = 2;
    static STATUS_MODIFY_REVIEW = 3;
    static STATUS_NO_PASS = 4;
    static STATUS_MODIFY_NO_PASS = 5;

    static list(){
        return {
            0: '用户',
            1: '订阅号',
            2: '企业号',
            3: '大佬',
            10: '管理员',
            11: '马甲',
        }
    }

    static getName(type){
        let map = this.list()
        if(type in map){
            return map[type]
        }else{
            return map[1]
        }
    }

    static index(filter){
        return axios.request({
            url: Url.getPath('admin/user/index', filter),
            method: 'get'
        })
    }
}
export default User
